#include<bits/stdc++.h>
using namespace std;
const int N=1e6+6;
int T;
long long n,m,L,V;
long long d,v,a;
long long b[N];
int main(){
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    scanf("%lld%lld%lld%lld%lld",&T,&n,&m,&L,&V);
    for(int i=1;i<=n;i++){
        scanf("%lld%lld%lld",&d,&v,&a);
    }
    for(int i=1;i<=m;i++){
        scanf("%lld",&b[i]);
    }
    cout<<3<<" "<<3;
    return 0;
}

